import request from "@/util/request";
import axios from 'axios'

export function getPageResource(word) {
  return request({
    url: "/admin/resource/page/"+word,
    method: "get",
  });
}

export function getWordTTSCatalog(word) {
  return request({
    url: "/admin/resource/voice/"+word,
    method: "get",
  });
}

export function getResourceFromMinIO(url){
  return axios.get(url,{timeout: 10000})
  // return axios.get(url.replace(/http:\/\/[a-z,A-Z]+[:][\d]+/,''),{timeout: 10000})
}